cmake_minimum_required(VERSION 3.10)
project(cv_camera_capture)

find_package(catkin REQUIRED COMPONENTS
    cv_bridge
    image_transport
    roscpp
    tf
    yunle_sensor_msgs
)

catkin_package(CATKIN_DEPENDS
    cv_bridge
    image_transport
    roscpp
    tf
    yunle_sensor_msgs
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_BUILD_TYPE "Release")

find_package(OpenCV REQUIRED)
message(" -- opencv_version: " ${OpenCV_VERSION})

file(GLOB source *.cpp ./src/*.cpp)
file(GLOB includes *.h ./include/*.h)

include_directories(./include)
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${catkin_INCLUDE_DIRS})

link_directories(/usr/local/lib)

add_executable(cv_camera_capture ${source})
target_link_libraries(cv_camera_capture ${OpenCV_LIBS})
target_link_libraries(cv_camera_capture ${catkin_LIBRARIES})

